package com.ek.kademlia.protocol.impl;

import java.net.SocketAddress;
import java.util.UUID;

import com.ek.kademlia.protocol.Response;

public class DiscoveryMessageResponse implements Response {

    private static final long serialVersionUID = -7468653091736980653L;
    private byte[] messageID;
    private byte[] nodeID;
    private SocketAddress socketAddress;

    public DiscoveryMessageResponse() {
        messageID = UUID.randomUUID().toString().getBytes();
    }

    public String getMessageClass() {
        return DiscoveryMessageResponse.class.getCanonicalName();
    }

    public byte[] getMessageID() {
        return messageID;
    }

    public void setMessageID(byte[] messageID) {
        this.messageID = messageID;
    }

    public void setNodeID(byte[] nodeID) {
        this.nodeID = nodeID;
    }

    public byte[] getNodeID() {
        return nodeID;
    }

    public SocketAddress getSocketAddress() {
        return socketAddress;
    }

    public void setSocketAddress(SocketAddress serviceAddress) {
        this.socketAddress = serviceAddress;

    }
}
